import { X } from 'x-orm';
import { ProxyUser } from './proxy_user';
import { BindAccount } from './bind_account';

export enum CashStatus {
    notdeal,
    ok,
    reject
}

@X.Entity({
    primary : 'id'
})
export class ProxyCash{
    id;
    proxy_id;
    money : number;
    add_time;
    status : CashStatus;
    before_money : number;
    after_money : number;

    @X.OneToOne(ProxyCash,ProxyUser,{
        from : 'proxy_id',
        to : 'id'
    })
    proxy : ProxyUser;

    @X.OneToOne(ProxyCash,BindAccount,{
        from : "proxy_id",
        to : "proxy_id"
    })
    bindAccount : BindAccount;
}